package com.uml.umlwork.controller;

import com.uml.umlwork.config.annotation.UserLoginToken;
import com.uml.umlwork.entity.enumeration.GenderEnum;
import com.uml.umlwork.entity.enumeration.TeacherTypeEnum;
import com.uml.umlwork.utils.EnumUtil;
import com.uml.umlwork.utils.SystemMsgJsonResponse;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * @author Siki
 * @date 2021/1/6
 */
@Api(tags = "枚举映射接口")
@RequestMapping("/api/v1/umlwork/enum")
@RestController
public class EnumController {
    @GetMapping("/teacherType")
    public SystemMsgJsonResponse getTeacherType(){
        return SystemMsgJsonResponse.success(EnumUtil.getEnumTypeJsonArray(TeacherTypeEnum.class));
    }
    @GetMapping("/gender")
    public SystemMsgJsonResponse getGender(){
        return SystemMsgJsonResponse.success(EnumUtil.getEnumTypeJsonArray(GenderEnum.class));
    }
}
